package edu.zut.cs.software.propertymanagement.daccross.web.spring.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import edu.zut.cs.software.base.web.spring.controller.GenericController;
import edu.zut.cs.software.propertymanagement.daccross.domain.Door;
import edu.zut.cs.software.propertymanagement.daccross.service.DoorManager;


@Controller
@CrossOrigin(origins = "*")
//拦截含有comment的url并处理
@RequestMapping("/door")//1.
public class DoorController extends GenericController<Door, Long,  DoorManager> {
	DoorManager doorManager;

	/*
	 * 部署成功后，在浏览器中输入url 
	 * http://localhost:8080/universalStore-web/${1.}/${2.value值}
	 * 例子:http://localhost:8080/universalStore-web/favorite/index.html
	 */

    @RequestMapping("/index")
    public String index() {
        return "door/index";
    }

	@Autowired
	public void setDoorManager(DoorManager doorManager) {
		this.doorManager = doorManager;
		this.manager = this.doorManager;
	}

}